package com.lock.immersive.pojo.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.lock.immersive.pojo.enums.OrderStatus;
import com.lock.immersive.pojo.enums.Size;
import com.lock.immersive.pojo.enums.TuanProcess;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName orders
 */
@TableName(value ="orders")
@Data
public class Orders implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer orderId;

    /**
     * 订单号
     */
    private String outTradeNo;

    /**
     * 商家id
     */
    private Integer merchantId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 地址id
     */
    private Integer addressId;

    /**
     * Product
     */
    private Integer productId;

    /**
     * 款式 json
     */
    private Size productItemSize;

    private Integer productItemId;
    /**
     * 
     */
    private Double totalPrice;

    /**
     * 单价
     */
    private Double unitPrice;

    /**
     * 邮费
     */
    private Double postFee = 0.00;

    /**
     * 数量
     */
    private Integer counts;

    /**
     * 折扣券id
     */
    private Integer userCouponId;

    /**
     * 逻辑删除
     */
    @TableLogic
    private Integer isDelete = 0;

    /**
     * 状态：1、未付款，2、已付款
     */
    private OrderStatus orderStatus;

    /**
     * 买家是否已经评价
     */
    private Integer buyerRate = 0;

    /**
     * 交易关闭时间
     */
    private String closeTime;

    /**
     * 交易完成时间
     */
    private String endTime;

    /**
     * 付款时间
     */
    private String paymentTime;

    /**
     * 发货时间
     */
    private String consignTime;

    private String tuanName;
    private TuanProcess tuanProcess;
    private Integer userTuanId;
    /**
     * 订单创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private String createTime;


    /**
     * 
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}